//
//  YYSNewsVideoCell.m
//  FanLaiWu
//
//  Created by gonglei on 17/3/16.
//  Copyright © 2017年 yys. All rights reserved.
//

#import "YYSNewsVideoCell.h"

@interface YYSNewsVideoCell ()
@property (weak, nonatomic) IBOutlet UILabel *rightDownLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *iconImage;

@end

@implementation YYSNewsVideoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    _rightDownLabel.hidden = YES;
}
-(void)setType:(ControllerType)type
{
    _type = type;
//    if (type == RecommandType) {
//        _rightDownLabel.textColor = [UIColor whiteColor];
//        _rightDownLabel.text = @"11:29";
//        _titleLabel.text = @"政协十二届五中全会闭会全过程";
//    } else if (type == MovieType){
//        _rightDownLabel.textColor = YYSRGBColor(0, 212, 179);
//        _rightDownLabel.text = @"8.9";
//        _titleLabel.text = @"蕃莱坞大片  热门大片";
//    } else if (type == VarietyType){
//        _rightDownLabel.textColor = YYSRGBColor(0, 212, 179);
//        _rightDownLabel.text = @"04-03期";
//         _titleLabel.text = @"快乐大本营  何炅又火了一把";
//    } else {
//        _rightDownLabel.hidden = YES;
//        _titleLabel.text = @"当翻唱遇见原唱，惊艳到爆";
//    }
}
-(void)setModel:(NSDictionary *)model
{
    _model = model;
    Video *video = [Video modelWithDictionary:_model];
    _titleLabel.text = video.title;
    [_iconImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",BASE_URL_TEST,video.img]]];
}
-(void)setVideo:(Video *)video
{
    _video = video;
    _titleLabel.text = video.title;
    [_iconImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",BASE_URL_TEST,video.img]]];
}
@end
